<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>经典小游戏合集</title>
    <style>
        body {
            font-family: 'Arial', sans-serif;
            background-image: url('https://img.tukuppt.com/ad_preview/00/69/10/607abbf21d7bc.jpg!/fw/980'); /* 请替换为实际背景图片URL */
            background-size: cover;
            background-position: center;
            margin: 0;
            padding: 0;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            height: 100vh;
            color: white;
        }

        header {
            text-align: center;
            margin-bottom: 20px;
        }

        h1 {
            font-size: 3em;
            color: #000; /* 修改为黑色 */
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
        }

        .game-list {
            display: flex;
            justify-content: space-around;
            flex-wrap: wrap;
            gap: 20px;
        }

        .game-item {
            background-color: rgba(255, 255, 255, 0.7);
            border-radius: 10px;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            text-align: center;
            padding: 20px;
            transition: transform 0.3s ease;
        }

        .game-item:hover {
            transform: translateY(-10px);
        }

        .game-item img {
            width: 100px;
            height: 100px;
            object-fit: cover;
            border-radius: 50%;
            margin-bottom: 10px;
        }

        .game-item h2 {
            font-size: 1.5em;
            margin: 0;
            color: #333;
        }

        .game-item a {
            text-decoration: none; /* 去掉链接的下划线 */
            color: inherit; /* 确保链接的颜色继承自父元素 */
        }

        footer {
            margin-top: 20px;
            text-align: center;
            color: #777;
        }
    </style>
</head>
<body>
    <header>
        <h1>经典小游戏合集</h1>
    </header>
    <main>
        <section class="game-list">
            <div class="game-item">
                <a href="snake.html">
                    <img src="images/snake.png" alt="贪吃蛇">
                    <h2>贪吃蛇</h2>
                </a>
            </div>
            <div class="game-item">
                <a href="tetris.html">
                    <img src="images/tetris.png" alt="俄罗斯方块">
                    <h2>俄罗斯方块</h2>
                </a>
            </div>
            <div class="game-item">
                <a href="minesweeper.html">
                    <img src="images/minesweeper.png" alt="扫雷">
                    <h2>扫雷</h2>
                </a>
            </div>
            <div class="game-item">
                <a href="guessnumber.html">
                    <img src="images/guessnumber.png" alt="猜数字">
                    <h2>猜数字</h2>
                </a>
            </div>
            <div class="game-item">
                <a href="tic-tac-toe.html">
                    <img src="images/tic-tac-toe.png" alt="三子棋">
                    <h2>三子棋</h2>
                </a>
            </div>
        </section>
    </main>
</body>
</html>